<?php
/**
 * About 模型
 */
class AboutModel extends Model {
	
	public function __construct() {
		parent::__construct('About');	
	}
	
	public function getList($num = 5) {
		$pre = C('DB_PREFIX');
		//$this->trueTableName = $pre.'about';
		$data = $this->query('select * from '.$pre.'about order by id desc limit 0,'.$num);
		
		return $data;
	}	
	
	public function loadMore($lastId = 0, $num = 5) {
		$pre = C('DB_PREFIX');
		//$this->trueTableName = $pre.'about';
		$data = $this->query('select * from '.$pre.'about where id<'.$lastId.' order by id desc limit 0,'.$num);
		if(!is_array($data) || !isset($data[0])) $data = array();
	
		return $data;
	}
	
}